package cate.game.role.res.farm.msg;

import cate.common.util.GameResult;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBFarms;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "取消预设的请求")
public class FarmCancelPrePlantReq implements MsgInput {
    @NoteField("地块位置")
    public byte pos;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        GameResult<Void> r = cc.getRole().getRes().farm.cancelPrePlant(pos);
        game.notice.message(cc.getRole(), r, true);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBFarms.CANCEL_PRE_PLANT_REQ;
    }
}
